// 将一维数组拆分为指定长度二维数组
// 将数组array分成长度为subGroupLength的小数组并返回新数组
export const group = function (array, subGroupLength) {
  let index = 0;
  let newArray = [];
  while(index < array.length) {
      newArray.push(array.slice(index, index += subGroupLength));
  }
  return newArray;
}